package com.xea.model;

import java.io.Serializable;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
 * 产品信息
 * @author Administrator
 *
 */
public class Product implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1248984239864300387L;

	private int id;
	
	/**
	 * 编号
	 */
	private String pno;
	/**
	 * 产品类别
	 */
	private int channelId;
	/**
	 * 名称
	 */
	private String name;
	/**
	 * 材料
	 */
	private String material;
	/**
	 * 规格
	 */
	private String volume;
	/**
	 * 描述
	 */
	private String describes;
	
	/**
	 * 发布时间
	 */
	private Date createDate;
	/**
	 * 是否发布
	 */
	private int pub;
	/**
	 * 图片数量
	 */
	private int num;
	
	/**
	 * 排序
	 */
	private int sortNo;
	
	private String coverPath;
	
	
	public String getCoverPath() {
		return coverPath;
	}
	public void setCoverPath(String coverPath) {
		this.coverPath = coverPath;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getPno() {
		return pno;
	}
	public void setPno(String pno) {
		this.pno = pno;
	}
	public int getChannelId() {
		return channelId;
	}
	public void setChannelId(int channelId) {
		this.channelId = channelId;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getMaterial() {
		return material;
	}
	public void setMaterial(String material) {
		this.material = material;
	}
	public String getVolume() {
		return volume;
	}
	public void setVolume(String volume) {
		this.volume = volume;
	}
	public String getDescribes() {
		return describes;
	}
	public void setDescribes(String describes) {
		this.describes = describes;
	}
	public String  getCreateDate() {
		return new SimpleDateFormat("yyyy-MM-dd").format(createDate);
	}
	public void setCreateDate(String  createDate) throws ParseException {
		this.createDate =new SimpleDateFormat("yyyy-MM-dd").parse(createDate);
	}
	public int getPub() {
		return pub;
	}
	public void setPub(int pub) {
		this.pub = pub;
	}
	public int getNum() {
		return num;
	}
	public void setNum(int num) {
		this.num = num;
	}
	public Product() {
		super();
	}
	
	
	public int getSortNo() {
		return sortNo;
	}
	public void setSortNo(int sortNo) {
		this.sortNo = sortNo;
	}
	public Product(String pno, int channelId, String name, String material,
			String volume, String describes, Date createDate, int pub, int num,
			String coverPath,int sortNo) {
		super();
		this.pno = pno;
		this.channelId = channelId;
		this.name = name;
		this.material = material;
		this.volume = volume;
		this.describes = describes;
		this.createDate = createDate;
		this.pub = pub;
		this.num = num;
		this.coverPath = coverPath;
		this.sortNo = sortNo;
	}
	
	

}
